package demo5;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 */
public class Test {
    public static void main(String[] args) {
        Dog dog1 = new Dog("柴六斤",5);
        Dog dog2 = new Dog("呼安",3);
        System.out.println(dog1.toString());
        System.out.println(dog2.toString());
    }
    public static void main3(String[] args) {
        Dog dog1 = new Dog("柴六斤",5);
        Dog dog2 = new Dog("柴六斤",5);
        System.out.println(dog1.hashCode());
        System.out.println(dog2.hashCode());
    }
    public static void main2(String[] args) {
        Dog dog1 = new Dog("柴六斤",5);
        Dog dog2 = new Dog("柴六斤",5);
        System.out.println(dog1.equals(dog2));
        /*System.out.println(dog1 == dog2 );*/
    }

    public static void main1(String[] args) {
        int a = 10;
        int b = 20;
        System.out.println(a ==b);
    }
}
